<template>
  <div class="user absolute">
    <div class="back">
      <img
        src="http://diandian.zgkpz.com/images/m_user/back.png"
        @click="back"
      />
    </div>
    <div class="main">
      <div class="main_background">
        <div class="wenzi">
          <div><label>手机号码：</label>1801455544</div>
          <div><label>今日闯关数：</label>4</div>
          <div><label>今日积分：</label>512</div>
          <div><label>总得分：</label>5112</div>
          <div><label>学习总时长：</label>5小时16分30秒</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
const NAME = "User";
export default {
  name: NAME,
  props: {},
  data: function () {
    return {
      userInfo: {},
    };
  },
  created() {
    window.addEventListener("resize", this.handleResize);
  },
  watch: {},
  mounted: function () {},
  methods: {
    handleResize() {
      if (document.body.clientWidth > 768) {
        this.$router.replace({ path: "/web/user" });
      }
    },
    back() {
      this.$router.replace({ path: "/" });
    },
    user() {
      this.$router.replace({ path: "/user" });
    },
  },
};
</script>

<style scoped>
.back {
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
}
.back img{
  width: 0.5rem;
}
.wenzi {
  display: flex;
  justify-content: space-around;
  flex-direction: column;
  position: relative;
  top: 3.7rem;
  font-size: 0.35rem;
  line-height: 1rem;
  padding-left: 0.85rem;
}
.wenzi label {
  color: #ffffff;
}
.main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.main_background {
  width: 6rem;
  height: 10rem;
  background: url("http://diandian.zgkpz.com/images/m_user/backgroud2.png")
    no-repeat;
  background-size: cover;
  background-size: 100% 100%;
}
</style>
